<?php
require('lib/verify.php');
require('lib/has_char.php');
require('lib/is_approved.php');
require('lib/is_admin.php');

$instance_id = $_POST["instance_id"];
$sql = "select * from wm_instances where instance_id='$instance_id'";
$result = $db->query($sql);
$inst = $db->fetch_assoc($result);

$_category = "warmath";
$_title = "Admin / Schedule a Raid: Step 2 of 2";
require('lib/head.php');

boxTop("Warmath: $_title");
?>
<b>Schedule a Raid</b><br /><br />
<form action="schedule-raid-3.php" method="post">
<input type="hidden" value="<?=$system["system_id"]?>" name="system_id">
<i>Instance</i><br/>
<b><?=$inst["instance_name"]?></b>
<input type="hidden" value="<?=$inst["instance_id"]?>" name="instance_id">
<br /><br />
<i>Bosses</i><br/>
<i>Check bosses planned for this raid.</i><br/>
<?php
$sql = "select * from wm_bosses where boss_trash =0 and boss_instance = " . $inst["instance_id"] . " order by boss_id";
$res = $db->query($sql);
while($abo = $db->fetch_assoc($res)) {
?>
 <input name="boss[<?=$abo["boss_id"]?>]" type="checkbox"> <a href="boss.php?id=<?=$abo["boss_id"]?>"><?=$abo["boss_name"]?></a><br />
<?php
    }
?>
<br />
<i>Date</i><br/>
<?date_select()?>
<br /><br />

<i>Desired Start Time</i><br/>
<?time_select()?>
<br /><br />

<i>Comments</i> (e.g. how far we plan to clear)<br />
<textarea name="comments" rows=5>
</textarea>
<br /><br />

<i>Pre-sign ups</i>
<i>(List player names, one per line)</i><br />
<textarea name="attendance" rows=25>
</textarea>
<br />
<br />

<input type="submit" name="submit" value="Schedule Raid"><br />
</form>
<?php
boxBot();
?>

<?php
require('lib/foot.php');
?>

